<template>
  <div class="article">
    <div class="title">《{{ title }}》</div>
    <div class="created-time">创建时间：{{ created_at }}</div>
    <div v-html="content"></div>
  </div>
</template>
<script>
import moment from 'moment';
export default {
  name: 'ArticleContent',
  props: {
    title: {
      type: String,
      default: '找不到文章',
    },
    content: {
      type: String,
      default: 'null',
    },
    createdAt: String,
    tag: String,
  },
  computed: {
    created_at: function () {
      return moment(this.createdAt).format('L');
    },
  },
};
</script>
<style src="./style.scss" lang="scss" scoped></style>
